<?php
namespace app\decorate\controller;
use app\AdminRest;
use app\ApiRest;
use think\App;
use think\facade\Db;
use think\Request;
use app\decorate\model\AdminMaster as master_model;

class IndexMaster extends ApiRest{
    protected $model;
    public function __construct(App $app) {
        parent::__construct($app);
        $this->model = new master_model();
    }

    /**
     * User: chenniang
     * Date: 2019-10-09 15:58
     * @return \think\Response
     * descption:大师团队列表
     */
    public function masterList(){
        $input = $this->_param;
        $dis = [];
        if(!empty($input['name'])){
            $dis[] = [['c.name','like','%\\'.$input['name'].'%']];
            $dis[] = [['b.name','like','%\\'.$input['name'].'%']];
        }
        $data  = $this->model->masterList(['a.uniacid'=>$this->_uniacid,'a.status'=>1],10,$dis);
        return $this->success($data);
    }

}
